Skip to content

fix(deps): update dependency ruby to v4#53

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/ruby-4.x
Open

fix(deps): update dependency ruby to v4#53
renovate[bot] wants to merge 1 commit intomainfrom
renovate/ruby-4.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 18, 2026

This PR contains the following updates:

Package Update Change Pending
ruby (source) major 3.4.94.0.2 4.0.3

Release Notes

ruby/ruby (ruby)

v4.0.2: 4.0.2

Compare Source

What's Changed

Note: This list is automatically generated by tool/gen-github-release.rb. Because of this, some commits may be missing.

Full Changelog

v4.0.1: 4.0.1

Compare Source

What's Changed

Note: This list is automatically generated by tool/gen-github-release.rb. Because of this, some commits may be missing.

Full Changelog

v4.0.0: 4.0.0

See also:

What's Changed

Note: This list is automatically generated by tool/gen-github-release.rb. Because of this, some commits may be missing.

Full Changelog

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday (* 0-4,22-23 * * 1-5)
    • Only on Sunday and Saturday (* * * * 0,6)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 18, 2026

Renovate PR Review Results

⚖️ Safety Assessment: ✅ Safe

🔍 Release Content Analysis

Ruby Version Update: 3.4.9 → 4.0.2

This is a major version upgrade from Ruby 3.4.9 to Ruby 4.0.2, spanning across:

  • Ruby 4.0.0 (released December 25, 2025)
  • Ruby 4.0.1 (patch release with 5 bug fixes)
  • Ruby 4.0.2 (patch release with 21 bug fixes)

Major Changes in Ruby 4.0

Core Breaking Changes:

  • Ractor API Overhaul: Removed Ractor.yield, Ractor#take, Ractor#close_incoming, Ractor#close_outgoing in favor of new Ractor::Port API
  • Process Creation Removal: Eliminated open("| command") and IO methods with leading | for subprocess creation (deprecated in 3.3)
  • Process::Status Operators: Removed & and >> bitwise operators (deprecated in 3.3)
  • Binding API Changes: Numbered parameters (_1, _2) and it no longer exposed via local_variables; new methods added: implicit_parameters, implicit_parameter_get, implicit_parameter_defined?

Standard Library Changes:

  • Set Class: Now a core class (no longer requires require "set"), reimplemented in C with changed inspect format: Set[1, 2, 3] instead of #<Set: {1, 2, 3}>
  • CGI Library: Removed except for cgi/escape; full CGI functionality requires external gems
  • sorted_set: Removed from stdlib; requires explicit gem installation
  • Net::HTTP: No longer automatically sets Content-Type: application/x-www-form-urlencoded header for POST/PUT requests

Security & Bug Fixes (4.0.1 & 4.0.2):

  • Fixed segfault with argument forwarding and splat operators (#21832)
  • Fixed YJIT local variable nil bug with fork/signal/ensure (#21941)
  • Fixed crash on signal raise (#21865)
  • Fixed GC crash in String#% (#21931)
  • Fixed memory allocation issues on low RAM machines with M:N threads (#21944)
  • Fixed integer overflow checks in enumerator (#21866)
  • Multiple Prism parser fixes (#21927, #21925, #21946, #21945)
  • Fixed Timeout.timeout behavior with Fiber scheduler (#21947)
  • 15+ additional stability and compatibility fixes

Deprecated Features:

  • ObjectSpace._id2ref marked for future removal

🎯 Impact Scope Investigation

Codebase Analysis Results

Ruby Runtime Usage:

  • Ruby is used as one of 7 supported sandbox runtimes (node, ruby, go, python, rust, node-typescript, bash)
  • Ruby executable path: /mise/installs/ruby/current/bin/ruby
  • Installation managed via mise version manager in Dockerfile

Code Execution Pattern:

  • Ruby runtime executes user-submitted code in isolated nsjail containers
  • Simple invocation: /mise/installs/ruby/current/bin/ruby <entryfile>
  • No custom Ruby configuration or advanced features required
  • No RestrictedFiles for Ruby runtime (unlike Go/TypeScript)

Test Coverage Analysis:

  • Runtime tests (e2e/tests/runtime/ruby.yml): 13 test cases covering basic Ruby features

    • Standard output/error handling
    • Multiple file execution with require_relative
    • JSON parsing (require 'json')
    • Array/hash operations, blocks, iterators
    • String operations, regex matching
    • Classes, inheritance, exception handling
    • All tests use core Ruby features with backward compatibility
  • Security tests (15 files in e2e/tests/security/): 117 Ruby test cases

    • Seccomp syscall filtering tests
    • Filesystem isolation tests
    • Process/memory security tests
    • Network security tests
    • All use basic Ruby syscall() method for low-level syscall testing

Breaking Change Impact Assessment:

Breaking Change Used in Codebase? Impact
Ractor API removal ❌ No None - no Ractor usage found
open("| cmd") removal ❌ No None - no pipe open patterns found
Process::Status operators ❌ No None - no process status manipulation
Binding numbered params ❌ No None - no metaprogramming with binding
Set library changes ❌ No None - no require "set" usage
CGI removal ❌ No None - no CGI usage
Net::HTTP changes ❌ No None - no HTTP client usage

Key Finding: The sandbox uses Ruby only for executing user-submitted code within nsjail isolation. The codebase does not use any of the removed or changed APIs. All test cases rely on core Ruby features that remain fully backward compatible in Ruby 4.0.

Dependency Impact

No Ruby Gem Dependencies:

  • The sandbox does not install or manage Ruby gems
  • No Gemfile or gem dependencies in the project
  • Runtime relies solely on Ruby core and standard library (JSON)

Build System Impact:

  • Dockerfile uses mise to install Ruby binary
  • No compilation from source
  • Simple version bump in ARG: RUBY_VERSION=3.4.9RUBY_VERSION=4.0.2

💡 Recommended Actions

✅ Safe to Merge

This PR is safe to merge immediately for the following reasons:

  1. Zero Breaking Change Impact: The codebase uses only basic Ruby features (puts, require_relative, JSON, syscall) that remain unchanged in Ruby 4.0

  2. No Advanced Feature Usage: No usage of Ractor, Set, CGI, process creation APIs, or metaprogramming features affected by breaking changes

  3. Comprehensive Bug Fixes: Ruby 4.0.2 includes 26+ bug fixes addressing segfaults, GC crashes, memory issues, and parser bugs - improving stability

  4. Test Coverage Validates Compatibility: All 130+ Ruby test cases (13 runtime + 117 security) cover the exact features used and will verify compatibility

  5. Simple Runtime Integration: Ruby is invoked as a standalone binary with no custom configuration or patches

Verification Steps (Post-Merge)

After merging, the automated CI should verify:

# Build with Ruby 4.0.2
docker compose down && docker compose up --build -d

# Run Ruby-specific E2E tests
go test -tags e2e ./e2e/... -run Ruby

# Run full E2E suite
go test -tags e2e ./e2e/...

Expected outcome: All tests pass without modification.

Migration Notes

None required. The sandbox's usage pattern (executing arbitrary user code) is naturally compatible with Ruby 4.0's changes. The breaking changes affect:

  • Advanced concurrency (Ractor) - not used
  • Process creation shortcuts - not used
  • Standard library gems - not used
  • Internal APIs - not used

Future Considerations

  • Ruby 4.0.3 Available: Release notes mention a pending version 4.0.3. Consider configuring Renovate to auto-merge patch updates for faster security fixes.

  • Monitor Test Output: While no changes are expected, watch for any subtle behavioral differences in user-submitted code execution, especially around:

    • Exception backtrace format (simplified in 4.0)
    • Error messages (now include receiver class names)

🔗 Reference Links

Release Documentation:

Migration Guides:

Technical References:

Generated by koki-develop/claude-renovate-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants